<%@taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>

<link type="text/css" rel="stylesheet" href="./css/style.css"/> 
<link type="text/css" rel="stylesheet" href="./css/jquery.tabs.css"/>
<link type="text/css" rel="stylesheet" href="./css/jquery.tabs-ie.css"/>
<link type="text/css" rel="stylesheet" href="./css/default.css"/>
<link type="text/css" rel="stylesheet" href="./css/jquery.tablesorter.pager.css"/>

<link type="text/css" rel="stylesheet" href="./css/joju.css"/> 


<%
  int row=1;
%>


<html:html locale="true">
<script>

// This function used to add value into paraent table  
	function fnAddList()
{
	var cbObj = document.CDBEmployeelist.individaulId;
    var blStatus = false;      
	var arrSize =cbObj.length;
// new add start


// for only one record 
if(arrSize==null)
{

if(document.CDBEmployeelist.individaulId.checked == true)
					{
						
						blStatus = true;

					}

}




// new add end 


// when more than one record

	if(arrSize>1)
			{
				for(var i=0;i<cbObj.length;i++)
				{
					if(cbObj[i].checked == true)
					{
						
						blStatus = true;
					}
				}
	
			}else
			{
					 if(cbObj.checked == true)
					 {
						blStatus = true;
					 }
			}

		if(!blStatus)
		{
				//alert("");
				return;
		}	
		else
	{
			// CHECK INDIVALID THERE IN PARENTJSP AFTER THAT ADD INTO PARENT LIST 
				
				// for adding into list when only one record
				if(arrSize==null)
					{

												alert(document.CDBEmployeelist.individaulId.value);
												window.opener.insertpath(document.CDBEmployeelist.individaulId.value);

										

					}
				else
					{

								for(var i=0;i<cbObj.length;i++)
									{
										if(cbObj[i].checked == true)
										{
												alert(document.CDBEmployeelist.individaulId[i].value);
												window.opener.insertpath(document.CDBEmployeelist.individaulId[i].value);

										}
									}

					}

			window.close(); 


	}
	
}

</script>

<body onblur="this.focus()">
<form name="CDBEmployeelist" method="POST">
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr bgcolor="#000088">
		<td align="right" COLSPAN="2"><img src="./images/index_01.jpg"></td>

	</tr>
</TABLE>
	<logic:present name="zoomExDetails"> 
	<table  width="100%"  border="0" class="tablesorter"  cellpadding="0" cellspacing="3">    
		<thead>
			<tr>
				<td width="10%">SlNO</td>
				<td width="25%">FileName</td>
				<td width="25%">Author</td>
				<td width="25%">Revision</td>
				<td width="15%">Date</td>	
			</tr>
		</thead>     
		<tbody>  
			<logic:iterate id="zoomEx" name="zoomExDetails" type="com.release.bean.FileList">
				<tr> 
					<td width="25%" align="right">
						<input type=radio name="individaulId" value='<bean:write name="zoomEx" property="name" />'  onClick =script:fnAddList() >
						<input type="hidden" name="filePath" value='<bean:write name="zoomEx" property="name" />'>
					</td> 
	       			<td nowrap>&nbsp;<bean:write name="zoomEx" property="name" /></td>
	       			<td nowrap>&nbsp;<bean:write name="zoomEx" property="author" /></td>
	       			<td nowrap>&nbsp;<bean:write name="zoomEx" property="revision" /></td>
	       			<td nowrap>&nbsp;<bean:write name="zoomEx" property="date" /></td>
	      		</tr>
			</logic:iterate>
		</tbody> 
	</table>
	</logic:present>
</form>
</body>
</html:html>